//
//  AppDelegate.m
//  StockpdfReading
//
//  Created by mac on 2017/6/12.
//  Copyright © 2017年 上海LOL信息技术服务有限公司. All rights reserved.
//

#import "AppDelegate.h"
#import <AVOSCloud.h>
#import "BaseTabBarController.h"



@interface AppDelegate ()

@end

@implementation AppDelegate


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    // Override point for customization after application launch.
    
    [self p_setRootViewController];
    [self p_setAVOSCloud:launchOptions];
    
    return YES;
}

#pragma mark - 设置根视图,引导页
-(void)p_setRootViewController{
    self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    [self.window makeKeyAndVisible];
    BaseTabBarController *root = [[BaseTabBarController alloc]init];
    self.window.rootViewController = root;
}

#pragma mark --- 设置网络数据库
-(void)p_setAVOSCloud:(NSDictionary *)launchOptions{
    [AVOSCloud setApplicationId:@"97plCmhNiDNgUJRT9wJxWdKp-9Nh9j0Va" clientKey:@"GeOmzyGNR8r171RERqyagQ0h"];
    [AVAnalytics trackAppOpenedWithLaunchOptions:launchOptions];
    [AVOSCloud setAllLogsEnabled:YES];
}


@end
